<?php
require_once '../../includes/global.php';
if($_POST['mode']=='change'){
//$userinfo=Dga('member'," userid like '".trim($_POST[userid])."' ");
if (1){
	$tmp['isrenzheng']='';
	$_SESSION['bb']='\''.$temp['userid'].'\'';
    
	if($_POST[chengxin]=='on'){
    	$tmp['isrenzheng'].=1;
    	$_SESSION['bb'].=',\'checked\'';
    }else {
    	$_SESSION['bb'].=',\'\'';
    }
    	
    	
    if($_POST[zhahuo]=='on'){
    	($tmp['isrenzheng']=='')?$tmp['isrenzheng'].='2':$tmp['isrenzheng'].=',2';
    	$_SESSION['bb'].=',\'checked\'';
    }else {
    	$_SESSION['bb'].=',\'\'';
    }
    	
    	
    if($_POST[shangjia]=='on'){
    	($tmp['isrenzheng']=='')?$tmp['isrenzheng'].='3':$tmp['isrenzheng'].=',3';
    	$_SESSION['bb'].=',\'checked\'';
    }else {
    	$_SESSION['bb'].=',\'\'';
    }
    	($tmp['isrenzheng']=='')?$tmp['isrenzheng']=0:'';
    	
    if(!Du('member',$tmp,'userid',$_POST['userid'])){
    	echo '{success:true,msg:\'ok\'}';
    }else {
    	echo '{success:true,msg:\'数据更新出错,请与程序员联系!\'}';
    }
	 
  }
}
?>